package iwpl.project.entities;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Forms entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "Forms")
public class Forms implements java.io.Serializable {

	// Fields

	private Integer id;
	private String formsName;
	private Set<RoleDetails> roleDetailses = new HashSet<RoleDetails>(0);

	// Constructors

	/** default constructor */
	public Forms() {
	}

	/** minimal constructor */
	public Forms(Integer id) {
		this.id = id;
	}

	/** full constructor */
	public Forms(Integer id, String formsName, Set<RoleDetails> roleDetailses) {
		this.id = id;
		this.formsName = formsName;
		this.roleDetailses = roleDetailses;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "ID", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "FormsName")
	public String getFormsName() {
		return this.formsName;
	}

	public void setFormsName(String formsName) {
		this.formsName = formsName;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "forms")
	public Set<RoleDetails> getRoleDetailses() {
		return this.roleDetailses;
	}

	public void setRoleDetailses(Set<RoleDetails> roleDetailses) {
		this.roleDetailses = roleDetailses;
	}

}